package com.baitengsoft.patentapimonitor.api.model.dto;

import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.util.Date;

/**
 * Created by Admin on 2017/12/28.
 */
public class WebDto {

    //用户名
    private String name;

    //用户昵称
    private String nickname;

    //最近登录时间
    private String logindatestr;

    //登录IP
    private String ipadress;

    //主要浏览器
    private String brower;

    private Integer logincount;



    private String createdatestr;

//    public WebDto(String name, String nickname, Date logindate, String ipadress, String brower,Integer logincount,Date createdate) {
//        this.name = name;
//        this.nickname = nickname;
//        this.logindate = logindate;
//        this.ipadress = ipadress;
//        this.brower = brower;
//        this.logincount=logincount;
//        this.createdate=createdate;
//    }

    public WebDto() {}

//    @Override
//    public String toString() {
//        return "WebDto{" +
//                "name='" + name + '\'' +
//                ", nickname='" + nickname + '\'' +
//                ", logindateStr='" + logindateStr + '\'' +
//                ", password='" + password + '\'' +
//                ", readCount=" + readCount +
//                '}';
//    }

    @ExcelResources(title="用户名",order=1)
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @ExcelResources(title="用户昵称",order=2)
    public String getNickname() {
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }

    @ExcelResources(title="最近登录时间",order=3)
    public String getLogindatestr() {
        return logindatestr;
    }

    public void setLogindatestr(String logindatestr) {
        this.logindatestr = logindatestr;
    }

    @ExcelResources(title="登录IP",order=4)
    public String getIpadress() {
        return ipadress;
    }

    public void setIpadress(String ipadress) {
        this.ipadress = ipadress;
    }

    @ExcelResources(title="主要浏览器",order=5)
    public String getBrower() {
        return brower;
    }

    public void setBrower(String brower) {
        this.brower = brower;
    }
    @ExcelResources(title="登录次数",order=6)
    public Integer getLogincount() {
        return logincount;
    }

    public void setLogincount(Integer logincount) {
        this.logincount = logincount;
    }
    @ExcelResources(title="开通日期",order=7)
    public String getCreatedatestr() {
        return createdatestr;
    }

    public void setCreatedatestr(String createdatestr) {
        this.createdatestr = createdatestr;
    }


    /**
     * 用来在对象的get方法上加入的annotation，通过该annotation说明某个属性所对应的标题
     * Created by 钟述林 393156105@qq.com on 2016/10/29 0:14.
     */
    @Retention(RetentionPolicy.RUNTIME)
    public @interface ExcelResources {
        /**
         * 属性的标题名称
         * @return
         */
        String title();
        /**
         * 在excel的顺序
         * @return
         */
        int order() default 9999;
    }
}
